import { axios } from '@/utils/request'

// 修改个人信息
export function changeUserInfo (data) {
  return axios({
    url: `/user/editUser`,
    method: 'post',
    dataType: 'payload',
    data
  })
}

// 充值金币
export function recharge (data) {
  return axios({
    url: `/user/recharge/${data.amount}`,
    method: 'get'
  })  
}

// 申请成为作家
export function applyAuthor () {
  return axios({
    url: `/user/applyAuthor`,
    method: 'get'
  }) 
}

// 打赏作者
export function payAuthor (data) {
  return axios({
    url: `/user/reward`,
    method: 'post',
    dataType: 'payload',
    data
  })  
}

// 申请入V
export function applyV () {
  return axios({
    url: `/user/applySign`,
    method: 'get'
  })   
}